package com.concurrent.data.thread.service;

/**
 * @author 哲思小辉
 * @version 1.0.0
 * @ClassName OrderListener.java
 * @Description 消费者
 * @Param
 * @createTime 2020年06月19日 17:02:00
 */

import com.concurrent.data.thread.config.RabbitMqConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = RabbitMqConfig.RABBITMQ_ORDER_QUEUE_NAME)
@Slf4j
public class QueueConsumer {

    @RabbitHandler
    public void process(String content) {
        log.info("消费者收到消息:{}", content);
    }
}